{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Black-Litterman allocation\n",
    "\n",
    "The Black-Litterman method is a very powerful way of converting your views on asset returns, along with your uncertainty in these views, into a portfolio.\n",
    "\n",
    "For a description of the theory, please read the [documentation page](https://pyportfolioopt.readthedocs.io/en/latest/BlackLitterman.html) and the links therein.\n",
    "\n",
    "In this recipe, we will cover:\n",
    "\n",
    "- Downloading data for the Black-Litterman method\n",
    "- Constructing the prior return vector based on market equilibrium\n",
    "- Two ways of constructing the uncertainty matrix\n",
    "- Combining Black-Litterman with mean-variance optimization\n",
    "\n",
    "## Downloading data\n",
    "\n",
    "In addition to price data, constructing a market prior requires market-caps. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import yfinance as yf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "tickers = [\"MSFT\", \"AMZN\", \"NAT\", \"BAC\", \"DPZ\", \"DIS\", \"KO\", \"MCD\", \"COST\", \"SBUX\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[*********************100%***********************]  10 of 10 completed\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>AMZN</th>\n",
       "      <th>BAC</th>\n",
       "      <th>COST</th>\n",
       "      <th>DIS</th>\n",
       "      <th>DPZ</th>\n",
       "      <th>KO</th>\n",
       "      <th>MCD</th>\n",
       "      <th>MSFT</th>\n",
       "      <th>NAT</th>\n",
       "      <th>SBUX</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2021-01-22</th>\n",
       "      <td>3292.229980</td>\n",
       "      <td>31.549999</td>\n",
       "      <td>362.299988</td>\n",
       "      <td>172.779999</td>\n",
       "      <td>380.369995</td>\n",
       "      <td>48.490002</td>\n",
       "      <td>213.380005</td>\n",
       "      <td>225.949997</td>\n",
       "      <td>2.87</td>\n",
       "      <td>103.910004</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-25</th>\n",
       "      <td>3294.000000</td>\n",
       "      <td>31.160000</td>\n",
       "      <td>361.880005</td>\n",
       "      <td>171.889999</td>\n",
       "      <td>378.489990</td>\n",
       "      <td>48.779999</td>\n",
       "      <td>213.339996</td>\n",
       "      <td>229.529999</td>\n",
       "      <td>2.87</td>\n",
       "      <td>103.449997</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-26</th>\n",
       "      <td>3326.129883</td>\n",
       "      <td>30.940001</td>\n",
       "      <td>364.980011</td>\n",
       "      <td>169.559998</td>\n",
       "      <td>378.839996</td>\n",
       "      <td>49.290001</td>\n",
       "      <td>215.380005</td>\n",
       "      <td>232.330002</td>\n",
       "      <td>2.91</td>\n",
       "      <td>104.690002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-27</th>\n",
       "      <td>3232.580078</td>\n",
       "      <td>29.830000</td>\n",
       "      <td>356.390015</td>\n",
       "      <td>163.029999</td>\n",
       "      <td>376.910004</td>\n",
       "      <td>48.529999</td>\n",
       "      <td>207.000000</td>\n",
       "      <td>232.899994</td>\n",
       "      <td>2.92</td>\n",
       "      <td>97.870003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-28</th>\n",
       "      <td>3237.620117</td>\n",
       "      <td>30.320000</td>\n",
       "      <td>357.059998</td>\n",
       "      <td>171.880005</td>\n",
       "      <td>371.600006</td>\n",
       "      <td>49.150002</td>\n",
       "      <td>206.820007</td>\n",
       "      <td>238.929993</td>\n",
       "      <td>2.85</td>\n",
       "      <td>98.150002</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   AMZN        BAC        COST         DIS         DPZ  \\\n",
       "Date                                                                     \n",
       "2021-01-22  3292.229980  31.549999  362.299988  172.779999  380.369995   \n",
       "2021-01-25  3294.000000  31.160000  361.880005  171.889999  378.489990   \n",
       "2021-01-26  3326.129883  30.940001  364.980011  169.559998  378.839996   \n",
       "2021-01-27  3232.580078  29.830000  356.390015  163.029999  376.910004   \n",
       "2021-01-28  3237.620117  30.320000  357.059998  171.880005  371.600006   \n",
       "\n",
       "                   KO         MCD        MSFT   NAT        SBUX  \n",
       "Date                                                             \n",
       "2021-01-22  48.490002  213.380005  225.949997  2.87  103.910004  \n",
       "2021-01-25  48.779999  213.339996  229.529999  2.87  103.449997  \n",
       "2021-01-26  49.290001  215.380005  232.330002  2.91  104.690002  \n",
       "2021-01-27  48.529999  207.000000  232.899994  2.92   97.870003  \n",
       "2021-01-28  49.150002  206.820007  238.929993  2.85   98.150002  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ohlc = yf.download(tickers, period=\"max\")\n",
    "prices = ohlc[\"Adj Close\"]\n",
    "prices.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[*********************100%***********************]  1 of 1 completed\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "Date\n",
       "1993-01-29    25.968958\n",
       "1993-02-01    26.153660\n",
       "1993-02-02    26.209057\n",
       "1993-02-03    26.486113\n",
       "1993-02-04    26.596937\n",
       "Name: Adj Close, dtype: float64"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "market_prices = yf.download(\"SPY\", period=\"max\")[\"Adj Close\"]\n",
    "market_prices.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'MSFT': 1802062528512,\n",
       " 'AMZN': 1624479105024,\n",
       " 'NAT': 430934208,\n",
       " 'BAC': 262292570112,\n",
       " 'DPZ': 14641003520,\n",
       " 'DIS': 311835000832,\n",
       " 'KO': 211218694144,\n",
       " 'MCD': 154103857152,\n",
       " 'COST': 158161518592,\n",
       " 'SBUX': 115551993856}"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mcaps = {}\n",
    "for t in tickers:\n",
    "    stock = yf.Ticker(t)\n",
    "    mcaps[t] = stock.info[\"marketCap\"]\n",
    "mcaps"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Constructing the prior"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'1.3.1'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pypfopt\n",
    "pypfopt.__version__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.62369280371204"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pypfopt import black_litterman, risk_models\n",
    "from pypfopt import BlackLittermanModel, plotting\n",
    "\n",
    "S = risk_models.CovarianceShrinkage(prices).ledoit_wolf()\n",
    "delta = black_litterman.market_implied_risk_aversion(market_prices)\n",
    "delta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUsAAAEYCAYAAADVrdTHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAl4UlEQVR4nO3deZwdZZn28d+VhH0RNYhsEkAYwKBsboMryAiiouJCcJcZHN9BR1xmVJBNHReGGUEYHZxBBEeW120QMxBeBB0ddQghgglbQAWCyiYqa5Lu6/2jqsPJobtPdZ+qPqdPru/nUx/6VJ1z15PQuc9T9Tz13LJNRESMb0avGxARMR0kWUZEVJBkGRFRQZJlREQFSZYRERUkWUZEVJBkGREDR9JZku6S9IsxjkvSaZKWSbpW0l6dYiZZRsQgOhs4cJzjBwE7lduRwBc7BUyyjIiBY/uHwH3jvOUQ4BwXfgpsJmnL8WLOqrOBU2H2k2Z6zrbrNBL75pue2EjcRjX1BFaDT3Z5xcrGYqNmwnqTDZsJDMx48JFG4nqD9RqJC/CnB+68x/bmdcV7+Us38r33DVV679XXProEaP1LO9P2mRM85dbA7S2v7yj3/WasD0y7ZDln23X430u3bST2K176+kbiMmtmM3EBHl3RSFitXNVIXIBVv76985smSbOa+ZV+5AV7NhIXYMMf39hI3FW779BIXIDLf3Tsr+uMd+99Q/zvpU+r9N6ZW978iO196jx/FdMuWUbE4DEwzPBUnnI50Nrr2qbcN6bcs4yIPmCGPFxpq8lFwNvKUfHnAX+wPeYlOKRnGRF9wMAqqt2zrELSecBLgNmS7gCOB9YBsP0lYD7wCmAZ8BDwzk4xkywjoueMGapxUNH2vA7HDfzNRGImWUZEXximv9f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b1XtDxzZcmwgckITBuUyfGeKb/V5FIuYXgB8yPZ2PW1YB5K2oOiBrGDN0fB1gdfa/m2v2hbVTMXlfd0kHQO8guLfytOAvWy7HHD8qu19e9rAPjUoyXIY+G/gCJeFyiTd6i5KhU4lSS+l5Xllj7KIcUSdJD2PYn7yAtsPlvt2Bja2vainjetTg5IsX0Mxt3JfijUhzwf+zV0uvx8RMWIgkuUISRtRrLU4D9gPOIdivckFPW1YREx7A5UsW0l6IuUjkO6yBk9ExMAmy4iIOjU29ywiYpAkWUZEVJBkGRFRQZJlREQF/x9kg/CUH+1f6gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plotting.plot_covariance(S, plot_correlation=True);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "AMZN    0.188493\n",
       "BAC     0.103315\n",
       "COST    0.075241\n",
       "DIS     0.097337\n",
       "DPZ     0.047762\n",
       "KO      0.062470\n",
       "MCD     0.067165\n",
       "MSFT    0.131621\n",
       "NAT     0.051900\n",
       "SBUX    0.080227\n",
       "dtype: float64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "market_prior = black_litterman.market_implied_prior_returns(mcaps, delta, S)\n",
    "market_prior"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmEAAAEvCAYAAAANTxbKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAbK0lEQVR4nO3dfbQddX3v8feHYJAYY7SAglEjBqUUaSypetvqVVrr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Gcb/ry8FPlZV39nXcAgcMzPWOoRdB5zQfWpkMb3/BD4+sMzHgX2fSnoJ8MnuPoyPA6en94mvxwIn0LtZdirbHHUzHpcky+n9w/i7VfWP+xZOcniSo7rpBwAvAD7HeJnNuBydZBFAkuPpHS9frKqvAruSPLW71PYq4Ir52Jkhm817iSSH0fvH8Xv3gy2gY2Z/rgZ+NslDkzwU+Fng6gV2zEyqW/5jwMVV9eGBvmO7n6F339OCOWa6Y+WIbvoo4CeBW7v32afove+g9z5cUMdMnzMY+GPvEDhmZq71JwOA5wG30zszcVbX9jbg57rpBwL/m96N9/8MHN+37lnderfR9+mkybY5bq+ZjgtwNnAPsKXvdQzwIOB64GZ6N+yfByxqvZ/zOC4v7vZ7C3ADsLZvm2vovem3AxfQPcR43F6zfC89A/jMwPYWyjHz4/TubbmH3hmLrX3r/nI3XtvoXXJbaMfMpGMDvAL4zsC/M6u7vk8Ct3Tj8wFgaev9nMdx+Ylu32/qfr6mb5vHd++7bd378IjW+zmfY9P1raR35uywgW2O/TEz05dPzJckSWqg9eVISZKkBckQJkmS1IAhTJIkqQFDmCRJUgOGMEmSpAYMYZIkSQ0YwiRJkhowhEmSJDXw/wHyf+w/hxe7PgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 720x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "market_prior.plot.barh(figsize=(10,5));"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Views\n",
    "\n",
    "In the BL method, views are specified via the matrix P (picking matrix) and the vector Q. Q contains the magnitude of each view, while P maps the views to the assets they belong to. \n",
    "\n",
    "If you are providing **absolute views** (i.e a return estimate for each asset), you don't have to worry about P and Q, you can just pass your views as a dictionary."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# You don't have to provide views on all the assets\n",
    "viewdict = {\n",
    "    \"AMZN\": 0.10,\n",
    "    \"BAC\": 0.30,\n",
    "    \"COST\": 0.05,\n",
    "    \"DIS\": 0.05,\n",
    "    \"DPZ\": 0.20,\n",
    "    \"KO\": -0.05,  # I think Coca-Cola will go down 5%\n",
    "    \"MCD\": 0.15,\n",
    "    \"MSFT\": 0.10,\n",
    "    \"NAT\": 0.50,  # but low confidence, which will be reflected later\n",
    "    \"SBUX\": 0.10\n",
    "}\n",
    "\n",
    "bl = BlackLittermanModel(S, pi=market_prior, absolute_views=viewdict)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Black-Litterman also allows for relative views, e.g you think asset A will outperform asset B by 10%. If you'd like to incorporate these, you will have to build P and Q yourself. An explanation for this is given in the [docs](https://pyportfolioopt.readthedocs.io/en/latest/BlackLitterman.html#views)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## View confidences\n",
    "\n",
    "In this section, we provide two ways that you may wish to construct the uncertainty matrix. The first is known as Idzorek's method. It allows you to specify a vector/list of percentage confidences."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "confidences = [\n",
    "    0.6,\n",
    "    0.4,\n",
    "    0.2,\n",
    "    0.5,\n",
    "    0.7, # confident in dominos\n",
    "    0.7, # confident KO will do poorly\n",
    "    0.7, \n",
    "    0.5,\n",
    "    0.1,\n",
    "    0.4\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "bl = BlackLittermanModel(S, pi=market_prior, absolute_views=viewdict, omega=\"idzorek\", view_confidences=confidences)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAa8AAAGbCAYAAABzgB+6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRw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JRA/0P0jsjflnX9FiefhPQrjz9g3rPAU6ldxnn1C2pqfnwAt4BXFhV+1bVwqrah94FwH36ljkL+N2qenhg3ZPojf9v6vT/9G7ZoUrvzshZwA/oHYyndY9hYVXtTe9dyb7AmcDJSQ7o1tshyXunuPuvA7MH7hA6hN7p/yuSvLZrmwOcC/xhN3/E+LWRJM+idxPAPVOsZVK6d8GfpncBuAb6tnp9G6tnYLnD6V24XrqhZYatu2b5JnpDT8fTe5c+N8mvdDXNovf3cX637Cj9Ob2bWm4ZaN/s4zvJUcAvMUHgDKuebeEY79e9bn2Z7gw6vbtajwZeMv56Qe/SyUiGDpO8MMkL+poWMfDNHt3zdSi9IAX4BnBs1zenq/eabv5IesPrF9C7bPL2bMEdpKO6EWFrWgJ8cqDtMvquX3VDNqt5po8D9yZZ2df2w6p6Tf9CVbU6yY3AS4dQ75y+/QX41apan2Qx8MaBZf8SWFxVn0xyAnBRd5AUcDlTUFWV5G3A2Ul+l96dTXcDJ9D7Q/iTbkx/Fr2Lwsu6VQ8DliV5kt6bn89W1fVTqWUzjT9vO9G7kH0h8McTLLe16tvcevp9lN7dm9cM3NdxVHddcSSq6uEkbwC+SW/Y523Ap5J8mN5zdAVw8kY2Maw67qX3RmiwfdUmju8Tuxtc5gH/ABzRvdMfST1s4BjqrlVOl7PonfFA747g+wZumvgmcFCSvarqn4a87/n0Xg+eQ+9Yv4veG7BL6V3zeoze9dXzq2r82uVvA3+W3n8ZCHBBVX2zu8Z4Nr07kgtYm+SD9F5fjphMUX48lCSpOTNh2FCStJ0xvCRJzTG8JEnNMbwkSc0xvCRJzTG8JEnNMbwkSc35/ypvBAhkmfbcAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 504x504 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(7,7))\n",
    "im = ax.imshow(bl.omega)\n",
    "\n",
    "# We want to show all ticks...\n",
    "ax.set_xticks(np.arange(len(bl.tickers)))\n",
    "ax.set_yticks(np.arange(len(bl.tickers)))\n",
    "\n",
    "ax.set_xticklabels(bl.tickers)\n",
    "ax.set_yticklabels(bl.tickers)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.0045905 , 0.00898597, 0.01212048, 0.00498592, 0.00080656,\n",
       "       0.00116796, 0.00175348, 0.00344722, 0.03449912, 0.00538453])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.diag(bl.omega)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note how NAT, which we gave the lowest confidence, also has the highest uncertainty.\n",
    "\n",
    "Instead of inputting confidences, we can calculate the uncertainty matrix directly by specifying 1 standard deviation confidence intervals, i.e bounds which we think will contain the true return 68% of the time. This may be easier than coming up with somewhat arbitrary percentage confidences"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "intervals = [\n",
    "    (0, 0.25),\n",
    "    (0.1, 0.4),\n",
    "    (-0.1, 0.15),\n",
    "    (-0.05, 0.1),\n",
    "    (0.15, 0.25),\n",
    "    (-0.1, 0),\n",
    "    (0.1, 0.2),\n",
    "    (0.08, 0.12),\n",
    "    (0.1, 0.9),\n",
    "    (0, 0.3)\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.015625, 0.022500000000000006, 0.015625, 0.0056250000000000015, 0.0025000000000000005, 0.0025000000000000005, 0.0025000000000000005, 0.00039999999999999986, 0.16000000000000003, 0.0225]\n"
     ]
    }
   ],
   "source": [
    "variances = []\n",
    "for lb, ub in intervals:\n",
    "    sigma = (ub - lb)/2\n",
    "    variances.append(sigma ** 2)\n",
    "\n",
    "print(variances)\n",
    "omega = np.diag(variances)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Posterior estimates\n",
    "\n",
    "Given the inputs, we can compute a posterior estimate of returns\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# We are using the shortcut to automatically compute market-implied prior\n",
    "bl = BlackLittermanModel(S, pi=\"market\", market_caps=mcaps, risk_aversion=delta,\n",
    "                        absolute_views=viewdict, omega=omega)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "AMZN    0.162904\n",
       "BAC     0.135479\n",
       "COST    0.060633\n",
       "DIS     0.074979\n",
       "DPZ     0.101862\n",
       "KO      0.007067\n",
       "MCD     0.104183\n",
       "MSFT    0.102650\n",
       "NAT     0.060905\n",
       "SBUX    0.083113\n",
       "dtype: float64"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Posterior estimate of returns\n",
    "ret_bl = bl.bl_returns()\n",
    "ret_bl"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can visualise how this compares to the prior and our views:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Prior</th>\n",
       "      <th>Posterior</th>\n",
       "      <th>Views</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>AMZN</th>\n",
       "      <td>0.188493</td>\n",
       "      <td>0.162904</td>\n",
       "      <td>0.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>BAC</th>\n",
       "      <td>0.103315</td>\n",
       "      <td>0.135479</td>\n",
       "      <td>0.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>COST</th>\n",
       "      <td>0.075241</td>\n",
       "      <td>0.060633</td>\n",
       "      <td>0.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>DIS</th>\n",
       "      <td>0.097337</td>\n",
       "      <td>0.074979</td>\n",
       "      <td>0.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>DPZ</th>\n",
       "      <td>0.047762</td>\n",
       "      <td>0.101862</td>\n",
       "      <td>0.20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>KO</th>\n",
       "      <td>0.062470</td>\n",
       "      <td>0.007067</td>\n",
       "      <td>-0.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MCD</th>\n",
       "      <td>0.067165</td>\n",
       "      <td>0.104183</td>\n",
       "      <td>0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MSFT</th>\n",
       "      <td>0.131621</td>\n",
       "      <td>0.102650</td>\n",
       "      <td>0.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>NAT</th>\n",
       "      <td>0.051900</td>\n",
       "      <td>0.060905</td>\n",
       "      <td>0.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>SBUX</th>\n",
       "      <td>0.080227</td>\n",
       "      <td>0.083113</td>\n",
       "      <td>0.10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Prior  Posterior  Views\n",
       "AMZN  0.188493   0.162904   0.10\n",
       "BAC   0.103315   0.135479   0.30\n",
       "COST  0.075241   0.060633   0.05\n",
       "DIS   0.097337   0.074979   0.05\n",
       "DPZ   0.047762   0.101862   0.20\n",
       "KO    0.062470   0.007067  -0.05\n",
       "MCD   0.067165   0.104183   0.15\n",
       "MSFT  0.131621   0.102650   0.10\n",
       "NAT   0.051900   0.060905   0.50\n",
       "SBUX  0.080227   0.083113   0.10"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rets_df = pd.DataFrame([market_prior, ret_bl, pd.Series(viewdict)], \n",
    "             index=[\"Prior\", \"Posterior\", \"Views\"]).T\n",
    "rets_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAsIAAAHmCAYAAAB5x+hkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAnvklEQVR4nO3de7ieVX0n/O+PRAsCOhUz2jEgocWrIISgSbDEoGKrWCtRUTTQUkcdOlwvLRWHtzhttbWHsR5GR8qIdNq32BPhBRVUUOsBOaidRBqQkxIpltC+U8DWE3gIrveP5wnZbHaSHdx73xvW53Ndua7nXvd69vPbd/bez/dZ97rXXa21AABAb3YbugAAABiCIAwAQJcEYQAAuiQIAwDQJUEYAIAuCcIAAHRp4VAv/IQnPKHtv//+Q708AACd+OIXv3hXa23R5PbBgvD++++fDRs2DPXyAAB0oqq+NlW7qREAAHRJEAYAoEuCMAAAXRpsjvBUfvCDH2Tz5s357ne/O3QpDzu77757Fi9enEc96lFDlwIA8LAwr4Lw5s2bs/fee2f//fdPVQ1dzsNGay133313Nm/enCVLlgxdDgDAw8K8mhrx3e9+N/vss48QvIuqKvvss4+RdACAXTCvgnASIfghctwAAHbNvAvCQ1uwYEGWLVuWQw45JK94xStyzz33TNnvyCOPnOPKAACYSfNqjvBkL37DxTP69T78zjU77bPHHntk48aNSZITTzwx55xzTk4//fT792/ZsiULFy7M5z73uWm/7tbnAAAwfxgR3oHVq1dn06ZNufzyy7N69eoce+yxOfjgg5Mke+21V5LRhWpnnHFGDjnkkBx66KFZt25dkkz5HAAA5g/DlNuxZcuWXHbZZTnmmGOSJNdcc02uv/76B63K8IEPfCAbN27Mtddem7vuuisrVqzIUUcdtcPnAAAwPCPCk9x7771ZtmxZli9fnv322y+vfe1rkyQrV66cMtBeddVVWbt2bRYsWJAnPvGJefazn53169fv8DkAAAzPiPAkE+cIT7Tnnnvu8td6KM8BAGBuGBH+Ea1evTrr1q3LfffdlzvvvDNXXHFFVq5cOXRZAADsxLSCcFUdU1VfrqpNVXXmFPtfXVV3VtXG8b/XzXyp89NLX/rSLF26NIcddliOPvrovO1tb8uTnvSkocsCAGAnqrW24w5VC5J8JcnPJdmcZH2Sta21Gyf0eXWS5a21U6f7wsuXL28bNmx4QNtNN92Ugw46aNrF80COHwDAg1XVF1tryye3T2dEeGWSTa21W1tr309yfpKdL8gLAADz2HSC8JOT3D5he/O4bbLjquq6qrqwqvadkeoAAGCWzNSqER9O8jette9V1a8kOS/J0ZM7VdXJSU5Okv3222+GXhoAYP67es1x0+676uKLZrEStprOiPAdSSaO8C4et92vtXZ3a+17483/leQZU32h1tq5rbXlrbXlixYteij1AgDAjJhOEF6f5MCqWlJVj07yqiSXTOxQVT8xYfPYJDfNXIkAADDzdjo1orW2papOTfLxJAuS/Flr7YaqekuSDa21S5L8WlUdm2RLkq8nefUs1gwAAD+yaa0j3Fq7tLX21NbaT7bW/mDc9qZxCE5r7Y2ttae11g5rrT23tXbzbBY9mxYsWJBly5blkEMOySte8Yrcc889u/T82267LX/913/9kF77yCOPfEjPAwBg183rWywfv+6UGf16F7zyvTvtM/EWyyeeeGLOOeecnH766dN+ja1B+IQTTpj2c7Zs2ZKFCxfmc5/73C4/BwCAh8Ytlndg9erV2bRpU77+9a/nJS95SZYuXZpnPvOZue6665Ikn/3sZ7Ns2bIsW7Yshx9+eL71rW/lzDPPzJVXXplly5blXe96V+67776cccYZWbFiRZYuXZr3ve99SZLLL788q1evzrHHHpuDDz44SbLXXnslSVprOeOMM3LIIYfk0EMPzbp167b7HAAAHhpDituxZcuWXHbZZTnmmGPy5je/OYcffng+9KEP5dOf/nROOumkbNy4Me94xzty9tlnZ9WqVfn2t7+d3XffPW9961vzjne8Ix/5yEeSJOeee24e97jHZf369fne976XVatW5fnPf36S5Jprrsn111+fJUuWPOC1P/CBD2Tjxo259tprc9ddd2XFihU56qijdvgcAAB2jSA8yb333ptly5YlGY0Iv/a1r80RRxyRiy4ared39NFH5+677843v/nNrFq1KqeffnpOPPHEvOxlL8vixYsf9PU+8YlP5LrrrsuFF16YJPnGN76RW265JY9+9KOzcuXKKQPtVVddlbVr12bBggV54hOfmGc/+9lZv359HvvYx273OQAA7BpBeJKJc4R35swzz8yLXvSiXHrppVm1alU+/vGPP6hPay1nnXVWXvCCFzyg/fLLL8+ee+65y/U9lOcAAPBg5ghPw+rVq/NXf/VXSUYB9glPeEIe+9jH5qtf/WoOPfTQ/MZv/EZWrFiRm2++OXvvvXe+9a1v3f/cF7zgBXnve9+bH/zgB0mSr3zlK/nOd76z09dbt25d7rvvvtx555254oorsnLlytn7BgEAOmREeBp+53d+J695zWuydOnSPOYxj8l5552XJHn3u9+dz3zmM9ltt93ytKc9LS984Quz2267ZcGCBTnssMPy6le/Oqeddlpuu+22PP3pT09rLYsWLcqHPvShHb7eS1/60nz+85/PYYcdlqrK2972tjzpSU/KzTc/bFelAwCYd6q1NsgLL1++vG3YsOEBbTfddFMOOuigQep5JHD8AGD+unrNcdPuu+rii2axkv5U1Rdba8snt5saAQBAlwRhAAC6JAgDANAlQRgAgC4JwgAAdEkQBgCgS4LwBM997nMfdHe4d7/73VmyZEne+ta3DlQVAACzYV7fUGNX1tubjp2tybd27dqcf/75D7gd8vnnn5/zzjsvRx111IzWAgDAsIwIT/Dyl788H/3oR/P9738/SXLbbbfln/7pn/LVr341p556apLkzjvvzHHHHZcVK1ZkxYoVufrqq5Mkhx56aP7t3/4trbXss88+ef/7358kOemkk/K3f/u3ueGGG7Jy5cosW7YsS5cuzS233DLMNwkAQBJB+AEe//jHZ+XKlbnsssuSjEaDjz/++FTV/X1OO+20vP71r8/69etz0UUX5XWve12SZNWqVbn66qtzww035IADDsiVV16ZJPn85z+fI488Muecc05OO+20bNy4MRs2bMjixYvn/hsEAOB+83pqxBC2To9Ys2ZNzj///Pzpn/5pvvSlL92//5Of/GRuvPHG+7e/+c1v5tvf/nZWr16dK664Ik95ylNyyimn5Nxzz80dd9yRH//xH8+ee+6Zn/mZn8kf/MEfZPPmzXnZy16WAw88cIhvDwCAMSPCk6xZsyaf+tSncs011+See+7JM57xjAfs/+EPf5gvfOEL2bhxYzZu3Jg77rgje+21V4466qhceeWVufLKK/Oc5zwnixYtyoUXXpjVq1cnSU444YRccskl2WOPPfLzP//z+fSnPz3EtwcAwJggPMlee+2V5z73uXnNa16TtWvXPmj/85///Jx11ln3b2/cuDFJsu++++auu+7KLbfckgMOOCDPetaz8o53vOP+i+xuvfXWHHDAAfm1X/u1rFmzJtddd92cfD8AAExNEJ7C2rVrc+21104ZhN/znvdkw4YNWbp0aQ4++OCcc8459+874ogj8tSnPjVJsnr16txxxx151rOelSS54IILcsghh2TZsmW5/vrrc9JJJ83NNwMAwJSqtTbICy9fvrxt2LDhAW033XRTDjrooEHqeSRw/ABg/tqVZWF3tuQru6aqvthaWz653YgwAABdEoQBAOiSIAwAQJfmXRAeas7yw53jBgCwa+ZVEN59991z9913C3W7qLWWu+++O7vvvvvQpQAAPGzMqzvLLV68OJs3b86dd945dCkPO7vvvrvbNgMA7IJ5FYQf9ahHZcmSJUOXAQBAB+bV1AgAAJgrgjAAAF0ShAEA6JIgDABAlwRhAAC6JAgDANAlQRgAgC4JwgAAdEkQBgCgS4IwAABdEoQBAOiSIAwAQJcEYQAAuiQIAwDQJUEYAIAuCcIAAHRJEAYAoEuCMAAAXRKEAQDokiA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OwVc29CfNBK8keSe7ZuisdzQetqp/KaJTnqUmeNm6+McmXk/xza+2rQ9XGcMyXZnvGAfhFGb2P7J/kkozmPt4xZF1zzXxpplJVn8m25RaTSR8MWmvPnfuqdqybIFxVb8noj9dNGd0L/GOttS3DVsXQxksAvXHy0kdVdWiSP2ytvXiYyoD5pqren9GyaZcmOb+1dv3AJQ2mqu7MDuZL97TWNttU1cokt7fW/nm8/ctJjktyW5Lfaa19fcDyptRTEP5hkn/ItpHPrd94Jflha+2wQQpjUFW1vrW2Yjv7vtRaO3SuawLmp/H7yNYzBb2fAl+QbfOll6bv+dKMVdU1SX62tfb1qjoqo4HHX02yLKObl718yPqm0tPFckumaKsk+2Z0MwX69O92sG+PuSoCmP9aa7sNXcN80Vq7L6OVIj42Yb705VVlvnTfFkwY9X1lRjdXuSjJRVW1cbiytq+bINxa+9rWx1V1eEZX/L4io1Hii4aqi8FtqKr/1Fr7k4mNVfW6bLt4DoBJppgv/Z4kHxyyJga3oKoWjqeePi/JyRP2zcvMOS+Lmg1V9dSMflnXJrkro+XT5uXEbebUryf5YFWdmAeuGvHoJC8dqiiA+WzSfOnf7Xm+NA/wN0k+W1V3Jbk3yZXJ/Remf2PIwrantznCVyZ5bWtt07jt1tbaAcNWxnxQVc/N6I96ktzQWvv0kPUAzGfmS7M94zvX/kSST7TWvjNue2qSvVpr1wxa3BR6CsIvyWjt4FUZzWs6P8n/aq1NNXcYAIBHuG6C8FZVtWeSNRlNkTg6yfuTfHDrXdYAAOhDd0F4oqr68Yxvu9xae97Q9QAAMHe6DsIAAPTLmogAAHRJEAYAoEuCMAAAXRKEAQDokiAMAECX/n8AO8WEsKPOkAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 864x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "rets_df.plot.bar(figsize=(12,8));"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Notice that the posterior is often between the prior and the views. This supports the fact that the BL method is essentially a Bayesian weighted-average of the prior and views, where the weight is determined by the confidence.\n",
    "\n",
    "A similar but less intuitive procedure can be used to produce the posterior covariance estimate:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVUAAAEYCAYAAADsymWcAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAqGklEQVR4nO3deZgdVZ3/8fenOwshCEqCDBAwrLKLEtBxFBVEgwsgiyaAgjKDzvxwHZ0BYZBFFGQYAWFGoyLbSODBZSJGAiMg6iiTBAKYIBAQIZFRAohACNDdn98fpxoql9vd1X2rmrq3v6/nqYdby/3WSZN8+9Sps8g2IYQQytH1UhcghBA6SSTVEEIoUSTVEEIoUSTVEEIoUSTVEEIoUSTVEEIo0biXugDDNXXDbk/ffHwlse9evmElcQHU21dZbKTqYvf0VBLWFf481FVdXcHrTKgstp55rrLYnlDdP/UnVj+0yvZGZcZ859sm+5FHewtdu/j2ZxbYnjnYNZJmAucC3cC3bJ/RcH4v4BxgV2CW7asazq8PLAN+aPvYwe7Vdkl1+ubj+d8Fm1cSe+b+R1QSF6Dr8dWVxWZCNb9kAPjjqkrC9j3xZCVxAbomrVNZ7J4dp1cWe9y9D1UWu29aqTlvLdctOuX3Zcdc9WgvNy+YVuja8ZvcO3Ww85K6gQuAfYEVwEJJ82wvy132AHAU8NkBwpwG3FSkPG2XVEMIY4HpdWlPM3sCy23fByBpLnAAqeaZ7mbfn5170U0l7Q5sDFwDzBjqZtGmGkKoHQN9uNBWwGbAg7n9FdmxIUnqAs5m4Brsi0RNNYRQS30UrqlOlbQotz/H9pySivEPwHzbK1Tw3UUk1RBC7RjTW3xeklW2B3ssXwnkX8RMy44V8dfAmy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r+/7HOOqamKulU4N2kR5i5pJclPS9tqYaWdcM5vvHNs6RdgC9FP8HyZcn03aSEOh2YB1yYdcNrJe7DDNK00Erf3apIuoEX+gRDQy3Y9ttGv1TtrZOSah9pTtX+yXX7/2AC+vKPNXUiaaHtPQY4d4ftXUa7TJ1M0iWkrlTzgbl+YbmZMmK3XdOCpD2BB20/lO0fSZpS8H7gZNuPvoTFa0udlFRf1ewwsDmpJviuUS5SIZLuGWi0l6TltlsaWBDWlv3y7e9mVlrbZJP79DctnAW03LRQFUm3AG+3/aikvUhPeR8HdiONRHzRKglhcB3Tpmr79/2fszaiw0i9AX5Hi6t7VmyRpL9zw7R5kv6WctqDQ06FbZNA06aF84AfVHnPFnXnaqMfIM3h+z3ge5KWvHTFal8dk1QlbUf6izybNCvTFbRHm9CngB9IOpy13/5PoPVZ7sMoamhaOKXMpoUKdUsal71/2Ac4JneuY/LDaOqkx/8+4OfA0c4W/JN0n+0RrTI52iS9jdywSTeZbDvU22g1LZRJ0gnAu0gVkS1IAwosaRvgYtt/85IWsA11UlI9kNQ39W9IXWbmAt9yizOjh9DpsmHYm5BmLnsqO7YdsJ7tW17SwrWhjkmq/SRNJq3jMxvYG7iEND3ftS9pwUIIY0LHJdU8Sa8gG7rqktaoCiGEwXR0Ug0hhNFWafeSEEIYayKphhBCiSKphhBCiSKphhBCiSKphhBCif4/SGvcBBPVcUAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "S_bl = bl.bl_cov()\n",
    "plotting.plot_covariance(S_bl);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Portfolio allocation\n",
    "\n",
    "Now that we have constructed our Black-Litterman posterior estimate, we can proceed to use any of the optimizers discussed in previous recipes."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pypfopt import EfficientFrontier, objective_functions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/Robert/github/PyPortfolioOpt/pypfopt/efficient_frontier.py:196: UserWarning: max_sharpe transforms the optimization problem so additional objectives may not work as expected.\n",
      "  warnings.warn(\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "OrderedDict([('AMZN', 0.20569),\n",
       "             ('BAC', 0.1621),\n",
       "             ('COST', 0.0521),\n",
       "             ('DIS', 0.06778),\n",
       "             ('DPZ', 0.129),\n",
       "             ('KO', 0.0),\n",
       "             ('MCD', 0.12415),\n",
       "             ('MSFT', 0.11823),\n",
       "             ('NAT', 0.05504),\n",
       "             ('SBUX', 0.08591)])"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ef = EfficientFrontier(ret_bl, S_bl)\n",
    "ef.add_objective(objective_functions.L2_reg)\n",
    "ef.max_sharpe()\n",
    "weights = ef.clean_weights()\n",
    "weights"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjsAAAIuCAYAAABZzclzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAABrOklEQVR4nO3dd3xcV5028Oc3Tb269xbHvcoltmzLCYlTxUAMdhqQhV3eNcvLvrsCdveF10BgC2vEUpI1S4dUOzgwkUlxmiRb7r3GvXerWmX6ef+YcSIc2xpJM3PuvfN8P5/5IE27j40zenTPPeeIUgpEREREVmXTHYCIiIgokVh2iIiIyNJYdoiIiMjSWHaIiIjI0lh2iIiIyNJYdoiIiMjSWHaIiIjI0lh2iIiIyNJYdoiIiMjSWHaIiIjI0lh2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jsH7ep3WPPAPiViLwnIt8Qkf7tHhvRbqjqmWQGJko2DmMREZnYrfaPU0q9KSLDAdwH4H4AO0RkfPThGw1jEVkSz+wQEZnftf3jXrz+AaVUnVLqBaXUZwBsATAv2eGIdGPZISIyv18D+I5Sak/7O0XkLhHJjH6dA2AEgFMa8hFpxWEsIiKTU0qdAfCTGzxUBOBpEQki8svtL5VSW6LDXkQpg3tjERERkaVxGIuIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILI1lh4iIiCyNZYeIiIgsjWWHiIiILO3/A42oe/TSSq03AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 720x720 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pd.Series(weights).plot.pie(figsize=(10,10));"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Leftover: $523.11\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'AMZN': 1,\n",
       " 'BAC': 107,\n",
       " 'COST': 3,\n",
       " 'DIS': 8,\n",
       " 'DPZ': 7,\n",
       " 'MCD': 13,\n",
       " 'MSFT': 10,\n",
       " 'NAT': 387,\n",
       " 'SBUX': 18}"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pypfopt import DiscreteAllocation\n",
    "\n",
    "da = DiscreteAllocation(weights, prices.iloc[-1], total_portfolio_value=20000)\n",
    "alloc, leftover = da.lp_portfolio()\n",
    "print(f\"Leftover: ${leftover:.2f}\")\n",
    "alloc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "pyportfolioopt",
   "language": "python",
   "name": "pyportfolioopt"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
